package cn.oveay.classdesign.service.impl;

import cn.oveay.classdesign.bean.basebean.Recode;
import cn.oveay.classdesign.dao.RecordDao;
import cn.oveay.classdesign.dao.impl.RecordDaoImpl;
import cn.oveay.classdesign.service.RecordService;

import java.util.List;

public class RecordServiceImpl implements RecordService {
    private RecordDao recordDao = new RecordDaoImpl();

    @Override
    public List<Recode> findAll() {
        return recordDao.findAll();
    }

    @Override
    public List<Recode> findByUserId(String userId) {
        return recordDao.findByUserId(userId);
    }

    @Override
    public List<Recode> findBySubjectId(String subjectId) {
        return recordDao.findBySubjectId(subjectId);
    }

    @Override
    public List<Recode> findByOptionId(String optionId) {
        return recordDao.findByOptionId(optionId);
    }

    @Override
    public List<Recode> findByUserIdANDSubjectId(String userId, String subjectId) {
        return recordDao.findByUserIdANDSubjectId(userId, subjectId);
    }

    @Override
    public Integer findUserIdBySubjectId(String subjectId) {
        return recordDao.findUserIdBySubjectId(subjectId);
    }

    @Override
    public void inseart(Recode recode) {
        recordDao.inseart(recode);
    }
}
